<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9"/>
<title>NGUI: UIRect Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">NGUI
   &#160;<span id="projectnumber">3.11.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_u_i_rect.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#pro-static-attribs">Static Protected Attributes</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_u_i_rect-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">UIRect Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Abstract UI rectangle containing functionality common to both panels and widgets. A UI rectangle contains 4 anchor points (one for each side), and it ensures that they are updated in the proper order.  
 <a href="class_u_i_rect.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for UIRect:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_u_i_rect.png" usemap="#UIRect_map" alt=""/>
  <map id="UIRect_map" name="UIRect_map">
<area href="class_u_i_panel.html" title="UI Panel is responsible for collecting, sorting and updating widgets in addition to generating widget..." alt="UIPanel" shape="rect" coords="0,112,102,136"/>
<area href="class_u_i_widget.html" title="Base class for all UI components that should be derived from when creating new widget types..." alt="UIWidget" shape="rect" coords="168,112,270,136"/>
<area href="class_u_i_basic_sprite.html" title="Functionality common to both NGUI and 2D sprites brought out into a single common parent..." alt="UIBasicSprite" shape="rect" coords="112,168,214,192"/>
<area href="class_u_i_label.html" alt="UILabel" shape="rect" coords="224,168,326,192"/>
<area href="class_u_i2_d_sprite.html" title="2D Sprite is capable of drawing sprites added in Unity 4.3. When importing your textures, import them as Sprites and you will be able to draw them with this widget. If you provide a Packing Tag in your import settings, your sprites will get automatically packed into an atlas for you, so creating an atlas beforehand is not necessary. " alt="UI2DSprite" shape="rect" coords="0,224,102,248"/>
<area href="class_u_i_sprite.html" title="Sprite is a textured element in the UI hierarchy. " alt="UISprite" shape="rect" coords="112,224,214,248"/>
<area href="class_u_i_texture.html" title="If you don&#39;t have or don&#39;t wish to create an atlas, you can simply use this script to draw a texture..." alt="UITexture" shape="rect" coords="224,224,326,248"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a674c759da6e6d9cd52ea256cf044c8ea"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a674c759da6e6d9cd52ea256cf044c8ea"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>AnchorUpdate</b> { <b>OnEnable</b>, 
<b>OnUpdate</b>, 
<b>OnStart</b>
 }</td></tr>
<tr class="separator:a674c759da6e6d9cd52ea256cf044c8ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a00ca3f8eef37a0d04d44c7b7ab6851b0"><td class="memItemLeft" align="right" valign="top">abstract float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a00ca3f8eef37a0d04d44c7b7ab6851b0">CalculateFinalAlpha</a> (int frameID)</td></tr>
<tr class="memdesc:a00ca3f8eef37a0d04d44c7b7ab6851b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the final cumulative alpha.  <a href="#a00ca3f8eef37a0d04d44c7b7ab6851b0">More...</a><br /></td></tr>
<tr class="separator:a00ca3f8eef37a0d04d44c7b7ab6851b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1063127dadfcc483a826af6f1dff878c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a1063127dadfcc483a826af6f1dff878c">Invalidate</a> (bool includeChildren)</td></tr>
<tr class="memdesc:a1063127dadfcc483a826af6f1dff878c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the local 'changed' flag, indicating that some parent value(s) are now be different, such as alpha for example.  <a href="#a1063127dadfcc483a826af6f1dff878c">More...</a><br /></td></tr>
<tr class="separator:a1063127dadfcc483a826af6f1dff878c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a092a23a9021c84600cd95e2d310a2fc7"><td class="memItemLeft" align="right" valign="top">virtual Vector3[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a092a23a9021c84600cd95e2d310a2fc7">GetSides</a> (Transform relativeTo)</td></tr>
<tr class="memdesc:a092a23a9021c84600cd95e2d310a2fc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the sides of the rectangle relative to the specified transform. The order is left, top, right, bottom.  <a href="#a092a23a9021c84600cd95e2d310a2fc7">More...</a><br /></td></tr>
<tr class="separator:a092a23a9021c84600cd95e2d310a2fc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69f5f3f52dc92bbe91de691eec344e2f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a69f5f3f52dc92bbe91de691eec344e2f">Update</a> ()</td></tr>
<tr class="memdesc:a69f5f3f52dc92bbe91de691eec344e2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rectangles need to update in a specific order &ndash; parents before children. When deriving from this class, override its <a class="el" href="class_u_i_rect.html#a0068dcbfbe2d6d809751b18a73ae4e94" title="Abstract update functionality, ensured to happen after the targeting anchors have been updated...">OnUpdate()</a> function instead.  <a href="#a69f5f3f52dc92bbe91de691eec344e2f">More...</a><br /></td></tr>
<tr class="separator:a69f5f3f52dc92bbe91de691eec344e2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6612973d92737a48bfbfcfd791a331b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#ad6612973d92737a48bfbfcfd791a331b">UpdateAnchors</a> ()</td></tr>
<tr class="memdesc:ad6612973d92737a48bfbfcfd791a331b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Manually update anchored sides.  <a href="#ad6612973d92737a48bfbfcfd791a331b">More...</a><br /></td></tr>
<tr class="separator:ad6612973d92737a48bfbfcfd791a331b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fe98a0b73b4921354b24ac7ba7e0d52"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a9fe98a0b73b4921354b24ac7ba7e0d52">SetAnchor</a> (Transform t)</td></tr>
<tr class="memdesc:a9fe98a0b73b4921354b24ac7ba7e0d52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions.  <a href="#a9fe98a0b73b4921354b24ac7ba7e0d52">More...</a><br /></td></tr>
<tr class="separator:a9fe98a0b73b4921354b24ac7ba7e0d52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8799f459e4b8129772641fd823cf370"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#ad8799f459e4b8129772641fd823cf370">SetAnchor</a> (GameObject go)</td></tr>
<tr class="memdesc:ad8799f459e4b8129772641fd823cf370"><td class="mdescLeft">&#160;</td><td class="mdescRight">Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions.  <a href="#ad8799f459e4b8129772641fd823cf370">More...</a><br /></td></tr>
<tr class="separator:ad8799f459e4b8129772641fd823cf370"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada1b92910471657f6ff9fb0a08375416"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#ada1b92910471657f6ff9fb0a08375416">SetAnchor</a> (GameObject go, int left, int bottom, int right, int top)</td></tr>
<tr class="memdesc:ada1b92910471657f6ff9fb0a08375416"><td class="mdescLeft">&#160;</td><td class="mdescRight">Anchor this rectangle to the specified transform.  <a href="#ada1b92910471657f6ff9fb0a08375416">More...</a><br /></td></tr>
<tr class="separator:ada1b92910471657f6ff9fb0a08375416"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeff062fb0628d331760555b957e7671b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#aeff062fb0628d331760555b957e7671b">SetAnchor</a> (GameObject go, float left, float bottom, float right, float top)</td></tr>
<tr class="memdesc:aeff062fb0628d331760555b957e7671b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Anchor this rectangle to the specified transform.  <a href="#aeff062fb0628d331760555b957e7671b">More...</a><br /></td></tr>
<tr class="separator:aeff062fb0628d331760555b957e7671b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd5f6258cf1c6e6b691134cf4271778d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#abd5f6258cf1c6e6b691134cf4271778d">SetAnchor</a> (GameObject go, float left, int leftOffset, float bottom, int bottomOffset, float right, int rightOffset, float top, int topOffset)</td></tr>
<tr class="memdesc:abd5f6258cf1c6e6b691134cf4271778d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Anchor this rectangle to the specified transform.  <a href="#abd5f6258cf1c6e6b691134cf4271778d">More...</a><br /></td></tr>
<tr class="separator:abd5f6258cf1c6e6b691134cf4271778d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae275abb7e681d994434930a470cf4bf2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#ae275abb7e681d994434930a470cf4bf2">SetAnchor</a> (float left, int leftOffset, float bottom, int bottomOffset, float right, int rightOffset, float top, int topOffset)</td></tr>
<tr class="memdesc:ae275abb7e681d994434930a470cf4bf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Anchor this rectangle to the specified transform.  <a href="#ae275abb7e681d994434930a470cf4bf2">More...</a><br /></td></tr>
<tr class="separator:ae275abb7e681d994434930a470cf4bf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ac985162bce40168970be89f845237b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a5ac985162bce40168970be89f845237b">SetScreenRect</a> (int left, int top, int width, int height)</td></tr>
<tr class="memdesc:a5ac985162bce40168970be89f845237b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the rect of the widget to the specified X, Y, width and height, anchored to the top-left corner of the screen. Convenience function for those familiar with GUI.Draw.  <a href="#a5ac985162bce40168970be89f845237b">More...</a><br /></td></tr>
<tr class="separator:a5ac985162bce40168970be89f845237b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a111e5817e6b281dc62d0030f816f7a27"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a111e5817e6b281dc62d0030f816f7a27">ResetAnchors</a> ()</td></tr>
<tr class="memdesc:a111e5817e6b281dc62d0030f816f7a27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ensure that all rect references are set correctly on the anchors.  <a href="#a111e5817e6b281dc62d0030f816f7a27">More...</a><br /></td></tr>
<tr class="separator:a111e5817e6b281dc62d0030f816f7a27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ccd47dd0ca220403baab7ba4c22cf1c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a6ccd47dd0ca220403baab7ba4c22cf1c">ResetAndUpdateAnchors</a> ()</td></tr>
<tr class="memdesc:a6ccd47dd0ca220403baab7ba4c22cf1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience method that resets and updates the anchors, all at once.  <a href="#a6ccd47dd0ca220403baab7ba4c22cf1c">More...</a><br /></td></tr>
<tr class="separator:a6ccd47dd0ca220403baab7ba4c22cf1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27131739b7a11c6692afefc494050e6b"><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a27131739b7a11c6692afefc494050e6b">SetRect</a> (float x, float y, float width, float height)</td></tr>
<tr class="memdesc:a27131739b7a11c6692afefc494050e6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the rectangle manually. XY is the bottom-left corner.  <a href="#a27131739b7a11c6692afefc494050e6b">More...</a><br /></td></tr>
<tr class="separator:a27131739b7a11c6692afefc494050e6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ce974582b32e40de0f7b045457715ff"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a7ce974582b32e40de0f7b045457715ff">ParentHasChanged</a> ()</td></tr>
<tr class="memdesc:a7ce974582b32e40de0f7b045457715ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Call this function when the rectangle's parent has changed.  <a href="#a7ce974582b32e40de0f7b045457715ff">More...</a><br /></td></tr>
<tr class="separator:a7ce974582b32e40de0f7b045457715ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a08f2f6519f157ed0100d306874b3793d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a08f2f6519f157ed0100d306874b3793d">leftAnchor</a> = new <a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>()</td></tr>
<tr class="memdesc:a08f2f6519f157ed0100d306874b3793d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Left side anchor.  <a href="#a08f2f6519f157ed0100d306874b3793d">More...</a><br /></td></tr>
<tr class="separator:a08f2f6519f157ed0100d306874b3793d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a14ea23fb356edb13898308414d42a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a7a14ea23fb356edb13898308414d42a0">rightAnchor</a> = new <a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>(1f)</td></tr>
<tr class="memdesc:a7a14ea23fb356edb13898308414d42a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Right side anchor.  <a href="#a7a14ea23fb356edb13898308414d42a0">More...</a><br /></td></tr>
<tr class="separator:a7a14ea23fb356edb13898308414d42a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53846e475c27070ab6492bab3d8bab0e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a53846e475c27070ab6492bab3d8bab0e">bottomAnchor</a> = new <a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>()</td></tr>
<tr class="memdesc:a53846e475c27070ab6492bab3d8bab0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bottom side anchor.  <a href="#a53846e475c27070ab6492bab3d8bab0e">More...</a><br /></td></tr>
<tr class="separator:a53846e475c27070ab6492bab3d8bab0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d90dc73b2f29bceb3aecfed6559fe32"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a7d90dc73b2f29bceb3aecfed6559fe32">topAnchor</a> = new <a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>(1f)</td></tr>
<tr class="memdesc:a7d90dc73b2f29bceb3aecfed6559fe32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Top side anchor.  <a href="#a7d90dc73b2f29bceb3aecfed6559fe32">More...</a><br /></td></tr>
<tr class="separator:a7d90dc73b2f29bceb3aecfed6559fe32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab60718a7b447de043f96e41f5abe104c"><td class="memItemLeft" align="right" valign="top">AnchorUpdate&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#ab60718a7b447de043f96e41f5abe104c">updateAnchors</a> = AnchorUpdate.OnUpdate</td></tr>
<tr class="memdesc:ab60718a7b447de043f96e41f5abe104c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether anchors will be recalculated on every update.  <a href="#ab60718a7b447de043f96e41f5abe104c">More...</a><br /></td></tr>
<tr class="separator:ab60718a7b447de043f96e41f5abe104c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a674b06c4354832effabee714fce88e03"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a674b06c4354832effabee714fce88e03">finalAlpha</a> = 1f</td></tr>
<tr class="memdesc:a674b06c4354832effabee714fce88e03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Final calculated alpha.  <a href="#a674b06c4354832effabee714fce88e03">More...</a><br /></td></tr>
<tr class="separator:a674b06c4354832effabee714fce88e03"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:ad0d4eb46f28691ce029828d531835543"><td class="memItemLeft" align="right" valign="top">Vector3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#ad0d4eb46f28691ce029828d531835543">GetLocalPos</a> (<a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a> ac, Transform trans)</td></tr>
<tr class="memdesc:ad0d4eb46f28691ce029828d531835543"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper function that gets the specified anchor's position relative to the chosen transform.  <a href="#ad0d4eb46f28691ce029828d531835543">More...</a><br /></td></tr>
<tr class="separator:ad0d4eb46f28691ce029828d531835543"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97203bdd83735f30ca9a5ccf2e5d771a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a97203bdd83735f30ca9a5ccf2e5d771a">OnEnable</a> ()</td></tr>
<tr class="memdesc:a97203bdd83735f30ca9a5ccf2e5d771a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Automatically find the parent rectangle.  <a href="#a97203bdd83735f30ca9a5ccf2e5d771a">More...</a><br /></td></tr>
<tr class="separator:a97203bdd83735f30ca9a5ccf2e5d771a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adaa5dbfec42452823e6b54b8bfdcbb8e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#adaa5dbfec42452823e6b54b8bfdcbb8e">OnInit</a> ()</td></tr>
<tr class="memdesc:adaa5dbfec42452823e6b54b8bfdcbb8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Automatically find the parent rectangle.  <a href="#adaa5dbfec42452823e6b54b8bfdcbb8e">More...</a><br /></td></tr>
<tr class="separator:adaa5dbfec42452823e6b54b8bfdcbb8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23ae4333cc04d6bdfc26ae64e2e638dd"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a23ae4333cc04d6bdfc26ae64e2e638dd">OnDisable</a> ()</td></tr>
<tr class="memdesc:a23ae4333cc04d6bdfc26ae64e2e638dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the parent rectangle reference.  <a href="#a23ae4333cc04d6bdfc26ae64e2e638dd">More...</a><br /></td></tr>
<tr class="separator:a23ae4333cc04d6bdfc26ae64e2e638dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef89f813fa10d700b924e33e4d5d2540"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#aef89f813fa10d700b924e33e4d5d2540">Awake</a> ()</td></tr>
<tr class="memdesc:aef89f813fa10d700b924e33e4d5d2540"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset 'mStarted' as Unity remembers its value. It can't be marked as [NonSerialized] because then Unity edit mode stops working properly and code recompile causes widgets to disappear.  <a href="#aef89f813fa10d700b924e33e4d5d2540">More...</a><br /></td></tr>
<tr class="separator:aef89f813fa10d700b924e33e4d5d2540"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d4f20dd92d3393101aa288f2eae8167"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a2d4f20dd92d3393101aa288f2eae8167">Start</a> ()</td></tr>
<tr class="memdesc:a2d4f20dd92d3393101aa288f2eae8167"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set anchor rect references on start.  <a href="#a2d4f20dd92d3393101aa288f2eae8167">More...</a><br /></td></tr>
<tr class="separator:a2d4f20dd92d3393101aa288f2eae8167"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc004d100e1308f6b7f339b98079b35f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#abc004d100e1308f6b7f339b98079b35f">UpdateAnchorsInternal</a> (int frame)</td></tr>
<tr class="memdesc:abc004d100e1308f6b7f339b98079b35f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update anchors.  <a href="#abc004d100e1308f6b7f339b98079b35f">More...</a><br /></td></tr>
<tr class="separator:abc004d100e1308f6b7f339b98079b35f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc0c80689e01ec1e0929a63080384835"><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#adc0c80689e01ec1e0929a63080384835">OnAnchor</a> ()</td></tr>
<tr class="memdesc:adc0c80689e01ec1e0929a63080384835"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the dimensions of the rectangle using anchor points.  <a href="#adc0c80689e01ec1e0929a63080384835">More...</a><br /></td></tr>
<tr class="separator:adc0c80689e01ec1e0929a63080384835"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec7de6dc50079c0c9818776e711814de"><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#aec7de6dc50079c0c9818776e711814de">OnStart</a> ()</td></tr>
<tr class="memdesc:aec7de6dc50079c0c9818776e711814de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abstract start functionality, ensured to happen after the anchor rect references have been set.  <a href="#aec7de6dc50079c0c9818776e711814de">More...</a><br /></td></tr>
<tr class="separator:aec7de6dc50079c0c9818776e711814de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0068dcbfbe2d6d809751b18a73ae4e94"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a0068dcbfbe2d6d809751b18a73ae4e94">OnUpdate</a> ()</td></tr>
<tr class="memdesc:a0068dcbfbe2d6d809751b18a73ae4e94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abstract update functionality, ensured to happen after the targeting anchors have been updated.  <a href="#a0068dcbfbe2d6d809751b18a73ae4e94">More...</a><br /></td></tr>
<tr class="separator:a0068dcbfbe2d6d809751b18a73ae4e94"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a4ff44256005f29afdd2217a557a94337"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ff44256005f29afdd2217a557a94337"></a>
GameObject&#160;</td><td class="memItemRight" valign="bottom"><b>mGo</b></td></tr>
<tr class="separator:a4ff44256005f29afdd2217a557a94337"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa9422b05a4c5e864ab420d4f6deabb8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa9422b05a4c5e864ab420d4f6deabb8"></a>
Transform&#160;</td><td class="memItemRight" valign="bottom"><b>mTrans</b></td></tr>
<tr class="separator:aaa9422b05a4c5e864ab420d4f6deabb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48701c2b861ebe1f2bc44ab9e66306a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a48701c2b861ebe1f2bc44ab9e66306a7"></a>
<a class="el" href="class_better_list.html">BetterList</a>&lt; <a class="el" href="class_u_i_rect.html">UIRect</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mChildren</b> = new <a class="el" href="class_better_list.html">BetterList</a>&lt;<a class="el" href="class_u_i_rect.html">UIRect</a>&gt;()</td></tr>
<tr class="separator:a48701c2b861ebe1f2bc44ab9e66306a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35907a9165729d291482ef76cf25c8bf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35907a9165729d291482ef76cf25c8bf"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mChanged</b> = true</td></tr>
<tr class="separator:a35907a9165729d291482ef76cf25c8bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83b7e0311c5c6ac4544a500e2cb2f0da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a83b7e0311c5c6ac4544a500e2cb2f0da"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mParentFound</b> = false</td></tr>
<tr class="separator:a83b7e0311c5c6ac4544a500e2cb2f0da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9842f6aebd5cfcb16d4d624f94a1837c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9842f6aebd5cfcb16d4d624f94a1837c"></a>
Camera&#160;</td><td class="memItemRight" valign="bottom"><b>mCam</b></td></tr>
<tr class="separator:a9842f6aebd5cfcb16d4d624f94a1837c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a1ab70409fb0ece835b0ec7d2632ca0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4a1ab70409fb0ece835b0ec7d2632ca0"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mStarted</b> = false</td></tr>
<tr class="separator:a4a1ab70409fb0ece835b0ec7d2632ca0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-attribs"></a>
Static Protected Attributes</h2></td></tr>
<tr class="memitem:a16265431db58043d1371d2b75e242cad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16265431db58043d1371d2b75e242cad"></a>
static Vector3[]&#160;</td><td class="memItemRight" valign="bottom"><b>mSides</b> = new Vector3[4]</td></tr>
<tr class="separator:a16265431db58043d1371d2b75e242cad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:a992da0e5d1cfe691521616dc189cd5e3"><td class="memItemLeft" align="right" valign="top">GameObject&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a992da0e5d1cfe691521616dc189cd5e3">cachedGameObject</a><code> [get]</code></td></tr>
<tr class="memdesc:a992da0e5d1cfe691521616dc189cd5e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Game object gets cached for speed. Can't simply return 'mGo' set in Awake because this function may be called on a prefab.  <a href="#a992da0e5d1cfe691521616dc189cd5e3">More...</a><br /></td></tr>
<tr class="separator:a992da0e5d1cfe691521616dc189cd5e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accdf9ee30fc896bb9891ad3f88223971"><td class="memItemLeft" align="right" valign="top">Transform&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#accdf9ee30fc896bb9891ad3f88223971">cachedTransform</a><code> [get]</code></td></tr>
<tr class="memdesc:accdf9ee30fc896bb9891ad3f88223971"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transform gets cached for speed. Can't simply return 'mTrans' set in Awake because this function may be called on a prefab.  <a href="#accdf9ee30fc896bb9891ad3f88223971">More...</a><br /></td></tr>
<tr class="separator:accdf9ee30fc896bb9891ad3f88223971"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d9276581ef544bcf5de05a9c4ba0e81"><td class="memItemLeft" align="right" valign="top">Camera&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a6d9276581ef544bcf5de05a9c4ba0e81">anchorCamera</a><code> [get]</code></td></tr>
<tr class="memdesc:a6d9276581ef544bcf5de05a9c4ba0e81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Camera used by anchors.  <a href="#a6d9276581ef544bcf5de05a9c4ba0e81">More...</a><br /></td></tr>
<tr class="separator:a6d9276581ef544bcf5de05a9c4ba0e81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7be6db86ecb5d2692a0d82b1fa32f981"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a7be6db86ecb5d2692a0d82b1fa32f981">isFullyAnchored</a><code> [get]</code></td></tr>
<tr class="memdesc:a7be6db86ecb5d2692a0d82b1fa32f981"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the rectangle is currently anchored fully on all sides.  <a href="#a7be6db86ecb5d2692a0d82b1fa32f981">More...</a><br /></td></tr>
<tr class="separator:a7be6db86ecb5d2692a0d82b1fa32f981"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e839a589bebb6e0951a8c573bc10675"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a2e839a589bebb6e0951a8c573bc10675">isAnchoredHorizontally</a><code> [get]</code></td></tr>
<tr class="memdesc:a2e839a589bebb6e0951a8c573bc10675"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the rectangle is anchored horizontally.  <a href="#a2e839a589bebb6e0951a8c573bc10675">More...</a><br /></td></tr>
<tr class="separator:a2e839a589bebb6e0951a8c573bc10675"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81489f538e22f5f9a427dc5b95a87615"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a81489f538e22f5f9a427dc5b95a87615">isAnchoredVertically</a><code> [get]</code></td></tr>
<tr class="memdesc:a81489f538e22f5f9a427dc5b95a87615"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the rectangle is anchored vertically.  <a href="#a81489f538e22f5f9a427dc5b95a87615">More...</a><br /></td></tr>
<tr class="separator:a81489f538e22f5f9a427dc5b95a87615"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbcd5b75b4994aafabb9b82225faac61"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#acbcd5b75b4994aafabb9b82225faac61">canBeAnchored</a><code> [get]</code></td></tr>
<tr class="memdesc:acbcd5b75b4994aafabb9b82225faac61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the rectangle can be anchored.  <a href="#acbcd5b75b4994aafabb9b82225faac61">More...</a><br /></td></tr>
<tr class="separator:acbcd5b75b4994aafabb9b82225faac61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4332a5373019290da50a2537f800139"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_u_i_rect.html">UIRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#aa4332a5373019290da50a2537f800139">parent</a><code> [get]</code></td></tr>
<tr class="memdesc:aa4332a5373019290da50a2537f800139"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the rectangle's parent, if any.  <a href="#aa4332a5373019290da50a2537f800139">More...</a><br /></td></tr>
<tr class="separator:aa4332a5373019290da50a2537f800139"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5573910254e9f08953dd2201b6ddc944"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_u_i_root.html">UIRoot</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a5573910254e9f08953dd2201b6ddc944">root</a><code> [get]</code></td></tr>
<tr class="memdesc:a5573910254e9f08953dd2201b6ddc944"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the root object, if any.  <a href="#a5573910254e9f08953dd2201b6ddc944">More...</a><br /></td></tr>
<tr class="separator:a5573910254e9f08953dd2201b6ddc944"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1451a6901601b09ff60b39c387abfed3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a1451a6901601b09ff60b39c387abfed3">isAnchored</a><code> [get]</code></td></tr>
<tr class="memdesc:a1451a6901601b09ff60b39c387abfed3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns 'true' if the widget is currently anchored on any side.  <a href="#a1451a6901601b09ff60b39c387abfed3">More...</a><br /></td></tr>
<tr class="separator:a1451a6901601b09ff60b39c387abfed3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4b5779989f6c0f3f0259d5b3a4993d5"><td class="memItemLeft" align="right" valign="top">abstract float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#ad4b5779989f6c0f3f0259d5b3a4993d5">alpha</a><code> [get, set]</code></td></tr>
<tr class="memdesc:ad4b5779989f6c0f3f0259d5b3a4993d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Local alpha, not relative to anything.  <a href="#ad4b5779989f6c0f3f0259d5b3a4993d5">More...</a><br /></td></tr>
<tr class="separator:ad4b5779989f6c0f3f0259d5b3a4993d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac755b8e3a6fec359df0f21fb65ee8737"><td class="memItemLeft" align="right" valign="top">abstract Vector3[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#ac755b8e3a6fec359df0f21fb65ee8737">localCorners</a><code> [get]</code></td></tr>
<tr class="memdesc:ac755b8e3a6fec359df0f21fb65ee8737"><td class="mdescLeft">&#160;</td><td class="mdescRight">Local-space corners of the UI rectangle. The order is bottom-left, top-left, top-right, bottom-right.  <a href="#ac755b8e3a6fec359df0f21fb65ee8737">More...</a><br /></td></tr>
<tr class="separator:ac755b8e3a6fec359df0f21fb65ee8737"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b7d5aa9d8f31c2cd92ed3dc2858f5b1"><td class="memItemLeft" align="right" valign="top">abstract Vector3[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a9b7d5aa9d8f31c2cd92ed3dc2858f5b1">worldCorners</a><code> [get]</code></td></tr>
<tr class="memdesc:a9b7d5aa9d8f31c2cd92ed3dc2858f5b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">World-space corners of the UI rectangle. The order is bottom-left, top-left, top-right, bottom-right.  <a href="#a9b7d5aa9d8f31c2cd92ed3dc2858f5b1">More...</a><br /></td></tr>
<tr class="separator:a9b7d5aa9d8f31c2cd92ed3dc2858f5b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f00c2933adf7c0037016fedba288ed5"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_rect.html#a0f00c2933adf7c0037016fedba288ed5">cameraRayDistance</a><code> [get]</code></td></tr>
<tr class="memdesc:a0f00c2933adf7c0037016fedba288ed5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper function that returns the distance to the camera's directional vector hitting the panel's plane.  <a href="#a0f00c2933adf7c0037016fedba288ed5">More...</a><br /></td></tr>
<tr class="separator:a0f00c2933adf7c0037016fedba288ed5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Abstract UI rectangle containing functionality common to both panels and widgets. A UI rectangle contains 4 anchor points (one for each side), and it ensures that they are updated in the proper order. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aef89f813fa10d700b924e33e4d5d2540"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIRect.Awake </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reset 'mStarted' as Unity remembers its value. It can't be marked as [NonSerialized] because then Unity edit mode stops working properly and code recompile causes widgets to disappear. </p>

<p>Reimplemented in <a class="el" href="class_u_i_widget.html#afcff1bf3ee0b6522913795ca9dd595c6">UIWidget</a>, and <a class="el" href="class_u_i_panel.html#ac8f96d64cf619e1c712596f39768bb80">UIPanel</a>.</p>

</div>
</div>
<a class="anchor" id="a00ca3f8eef37a0d04d44c7b7ab6851b0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">abstract float UIRect.CalculateFinalAlpha </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>frameID</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the final cumulative alpha. </p>

<p>Implemented in <a class="el" href="class_u_i_panel.html#acd9736460126290f248d2641bb1d390e">UIPanel</a>, and <a class="el" href="class_u_i_widget.html#aeb89dadcabded41f1a4869187819f107">UIWidget</a>.</p>

</div>
</div>
<a class="anchor" id="ad0d4eb46f28691ce029828d531835543"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Vector3 UIRect.GetLocalPos </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>&#160;</td>
          <td class="paramname"><em>ac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Transform&#160;</td>
          <td class="paramname"><em>trans</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Helper function that gets the specified anchor's position relative to the chosen transform. </p>

</div>
</div>
<a class="anchor" id="a092a23a9021c84600cd95e2d310a2fc7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual Vector3 [] UIRect.GetSides </td>
          <td>(</td>
          <td class="paramtype">Transform&#160;</td>
          <td class="paramname"><em>relativeTo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the sides of the rectangle relative to the specified transform. The order is left, top, right, bottom. </p>

<p>Reimplemented in <a class="el" href="class_u_i_label.html#a99123091a5cc58bb0bcafc685eb997f9">UILabel</a>, <a class="el" href="class_u_i_panel.html#af360658a2751450623b9c3e901e9e4d9">UIPanel</a>, and <a class="el" href="class_u_i_widget.html#ac1168f56d9ea1218c26b1a49439429ea">UIWidget</a>.</p>

</div>
</div>
<a class="anchor" id="a1063127dadfcc483a826af6f1dff878c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIRect.Invalidate </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>includeChildren</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the local 'changed' flag, indicating that some parent value(s) are now be different, such as alpha for example. </p>

<p>Reimplemented in <a class="el" href="class_u_i_panel.html#a882c9f7c7ffca74daa6cee1e6d1c4cc9">UIPanel</a>, and <a class="el" href="class_u_i_widget.html#a426caed24f879c7dab13b6de5d05b0cd">UIWidget</a>.</p>

</div>
</div>
<a class="anchor" id="adc0c80689e01ec1e0929a63080384835"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">abstract void UIRect.OnAnchor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update the dimensions of the rectangle using anchor points. </p>

<p>Implemented in <a class="el" href="class_u_i_label.html#a59ba575ee99b28b6e461e9214ff2ed96">UILabel</a>, <a class="el" href="class_u_i_panel.html#a9a7768f237d282b1b5cc883d572b18df">UIPanel</a>, and <a class="el" href="class_u_i_widget.html#a2ba574521440010e31c013392ce52fa9">UIWidget</a>.</p>

</div>
</div>
<a class="anchor" id="a23ae4333cc04d6bdfc26ae64e2e638dd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIRect.OnDisable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clear the parent rectangle reference. </p>

<p>Reimplemented in <a class="el" href="class_u_i_widget.html#a5a4abfee5f207d1a141b027e9573e0e5">UIWidget</a>, <a class="el" href="class_u_i_panel.html#a38dfa0ccfcd2e384e76b3191e878da66">UIPanel</a>, and <a class="el" href="class_u_i_label.html#afa8d53469f20cd1300381eccb46a056f">UILabel</a>.</p>

</div>
</div>
<a class="anchor" id="a97203bdd83735f30ca9a5ccf2e5d771a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIRect.OnEnable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Automatically find the parent rectangle. </p>

<p>Reimplemented in <a class="el" href="class_u_i_label.html#a638efac839e9de7e72dc93c2dc318935">UILabel</a>, and <a class="el" href="class_u_i_panel.html#a95d8578858711ccd781a665a4d9c7df7">UIPanel</a>.</p>

</div>
</div>
<a class="anchor" id="adaa5dbfec42452823e6b54b8bfdcbb8e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIRect.OnInit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Automatically find the parent rectangle. </p>

<p>Reimplemented in <a class="el" href="class_u_i_widget.html#a2ea9bf02545130f2cc41c9f6568af64b">UIWidget</a>, <a class="el" href="class_u_i_panel.html#ac9888a4c8dee6908b5a720dace2fde20">UIPanel</a>, <a class="el" href="class_u_i_label.html#a74c4753b23b00a86948cb196728edc94">UILabel</a>, and <a class="el" href="class_u_i_sprite.html#a74bbf04064491087cf680ff4640a6776">UISprite</a>.</p>

</div>
</div>
<a class="anchor" id="aec7de6dc50079c0c9818776e711814de"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">abstract void UIRect.OnStart </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Abstract start functionality, ensured to happen after the anchor rect references have been set. </p>

<p>Implemented in <a class="el" href="class_u_i_label.html#abf6f5422034de42a8c08a258534980bc">UILabel</a>, <a class="el" href="class_u_i_widget.html#ae95f5f934102f5411ce63ec8ae330ceb">UIWidget</a>, and <a class="el" href="class_u_i_panel.html#a5365f292443f114184d0ce2b99fcdb2a">UIPanel</a>.</p>

</div>
</div>
<a class="anchor" id="a0068dcbfbe2d6d809751b18a73ae4e94"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIRect.OnUpdate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Abstract update functionality, ensured to happen after the targeting anchors have been updated. </p>

<p>Reimplemented in <a class="el" href="class_u_i_widget.html#a4f2e9f9df37f192bb29e7b29973037d4">UIWidget</a>, <a class="el" href="class_u_i_sprite.html#ac84e86da0ae89616ad4d471e4a8ce896">UISprite</a>, <a class="el" href="class_u_i_texture.html#a5397273d8679c8cfba3d3f4858414599">UITexture</a>, and <a class="el" href="class_u_i2_d_sprite.html#a7ffc3e06087c453dfc61ef8e429db590">UI2DSprite</a>.</p>

</div>
</div>
<a class="anchor" id="a7ce974582b32e40de0f7b045457715ff"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIRect.ParentHasChanged </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Call this function when the rectangle's parent has changed. </p>

<p>Reimplemented in <a class="el" href="class_u_i_widget.html#a868dff78bb2814bf9b637eca80c9ad5f">UIWidget</a>, and <a class="el" href="class_u_i_panel.html#af7fccef5a3343e1b22e8ff2aa6459d4b">UIPanel</a>.</p>

</div>
</div>
<a class="anchor" id="a111e5817e6b281dc62d0030f816f7a27"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.ResetAnchors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Ensure that all rect references are set correctly on the anchors. </p>

</div>
</div>
<a class="anchor" id="a6ccd47dd0ca220403baab7ba4c22cf1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.ResetAndUpdateAnchors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convenience method that resets and updates the anchors, all at once. </p>

</div>
</div>
<a class="anchor" id="a9fe98a0b73b4921354b24ac7ba7e0d52"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.SetAnchor </td>
          <td>(</td>
          <td class="paramtype">Transform&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions. </p>

</div>
</div>
<a class="anchor" id="ad8799f459e4b8129772641fd823cf370"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.SetAnchor </td>
          <td>(</td>
          <td class="paramtype">GameObject&#160;</td>
          <td class="paramname"><em>go</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions. </p>

</div>
</div>
<a class="anchor" id="ada1b92910471657f6ff9fb0a08375416"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.SetAnchor </td>
          <td>(</td>
          <td class="paramtype">GameObject&#160;</td>
          <td class="paramname"><em>go</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bottom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>top</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Anchor this rectangle to the specified transform. </p>

</div>
</div>
<a class="anchor" id="aeff062fb0628d331760555b957e7671b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.SetAnchor </td>
          <td>(</td>
          <td class="paramtype">GameObject&#160;</td>
          <td class="paramname"><em>go</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>bottom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>top</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Anchor this rectangle to the specified transform. </p>

</div>
</div>
<a class="anchor" id="abd5f6258cf1c6e6b691134cf4271778d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.SetAnchor </td>
          <td>(</td>
          <td class="paramtype">GameObject&#160;</td>
          <td class="paramname"><em>go</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>leftOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>bottom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bottomOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rightOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>top</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>topOffset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Anchor this rectangle to the specified transform. </p>

</div>
</div>
<a class="anchor" id="ae275abb7e681d994434930a470cf4bf2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.SetAnchor </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>leftOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>bottom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bottomOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rightOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>top</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>topOffset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Anchor this rectangle to the specified transform. </p>

</div>
</div>
<a class="anchor" id="a27131739b7a11c6692afefc494050e6b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">abstract void UIRect.SetRect </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the rectangle manually. XY is the bottom-left corner. </p>

<p>Implemented in <a class="el" href="class_u_i_panel.html#ac04c5fe5c43f97447ac68ea7e1d076ee">UIPanel</a>, and <a class="el" href="class_u_i_widget.html#a07ad2943c5864515a76275b94ddd1357">UIWidget</a>.</p>

</div>
</div>
<a class="anchor" id="a5ac985162bce40168970be89f845237b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.SetScreenRect </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>top</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the rect of the widget to the specified X, Y, width and height, anchored to the top-left corner of the screen. Convenience function for those familiar with GUI.Draw. </p>

</div>
</div>
<a class="anchor" id="a2d4f20dd92d3393101aa288f2eae8167"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.Start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set anchor rect references on start. </p>

</div>
</div>
<a class="anchor" id="a69f5f3f52dc92bbe91de691eec344e2f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.Update </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rectangles need to update in a specific order &ndash; parents before children. When deriving from this class, override its <a class="el" href="class_u_i_rect.html#a0068dcbfbe2d6d809751b18a73ae4e94" title="Abstract update functionality, ensured to happen after the targeting anchors have been updated...">OnUpdate()</a> function instead. </p>

</div>
</div>
<a class="anchor" id="ad6612973d92737a48bfbfcfd791a331b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.UpdateAnchors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Manually update anchored sides. </p>

</div>
</div>
<a class="anchor" id="abc004d100e1308f6b7f339b98079b35f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void UIRect.UpdateAnchorsInternal </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>frame</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update anchors. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a53846e475c27070ab6492bab3d8bab0e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a> UIRect.bottomAnchor = new <a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>()</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bottom side anchor. </p>

</div>
</div>
<a class="anchor" id="a674b06c4354832effabee714fce88e03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float UIRect.finalAlpha = 1f</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Final calculated alpha. </p>

</div>
</div>
<a class="anchor" id="a08f2f6519f157ed0100d306874b3793d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a> UIRect.leftAnchor = new <a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>()</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Left side anchor. </p>

</div>
</div>
<a class="anchor" id="a7a14ea23fb356edb13898308414d42a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a> UIRect.rightAnchor = new <a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>(1f)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Right side anchor. </p>

</div>
</div>
<a class="anchor" id="a7d90dc73b2f29bceb3aecfed6559fe32"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a> UIRect.topAnchor = new <a class="el" href="class_u_i_rect_1_1_anchor_point.html">AnchorPoint</a>(1f)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Top side anchor. </p>

</div>
</div>
<a class="anchor" id="ab60718a7b447de043f96e41f5abe104c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">AnchorUpdate UIRect.updateAnchors = AnchorUpdate.OnUpdate</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Whether anchors will be recalculated on every update. </p>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="ad4b5779989f6c0f3f0259d5b3a4993d5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">abstract float UIRect.alpha</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Local alpha, not relative to anything. </p>

</div>
</div>
<a class="anchor" id="a6d9276581ef544bcf5de05a9c4ba0e81"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Camera UIRect.anchorCamera</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Camera used by anchors. </p>

</div>
</div>
<a class="anchor" id="a992da0e5d1cfe691521616dc189cd5e3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GameObject UIRect.cachedGameObject</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Game object gets cached for speed. Can't simply return 'mGo' set in Awake because this function may be called on a prefab. </p>

</div>
</div>
<a class="anchor" id="accdf9ee30fc896bb9891ad3f88223971"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Transform UIRect.cachedTransform</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Transform gets cached for speed. Can't simply return 'mTrans' set in Awake because this function may be called on a prefab. </p>

</div>
</div>
<a class="anchor" id="a0f00c2933adf7c0037016fedba288ed5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float UIRect.cameraRayDistance</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Helper function that returns the distance to the camera's directional vector hitting the panel's plane. </p>

</div>
</div>
<a class="anchor" id="acbcd5b75b4994aafabb9b82225faac61"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool UIRect.canBeAnchored</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Whether the rectangle can be anchored. </p>

</div>
</div>
<a class="anchor" id="a1451a6901601b09ff60b39c387abfed3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool UIRect.isAnchored</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns 'true' if the widget is currently anchored on any side. </p>

</div>
</div>
<a class="anchor" id="a2e839a589bebb6e0951a8c573bc10675"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool UIRect.isAnchoredHorizontally</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Whether the rectangle is anchored horizontally. </p>

</div>
</div>
<a class="anchor" id="a81489f538e22f5f9a427dc5b95a87615"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool UIRect.isAnchoredVertically</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Whether the rectangle is anchored vertically. </p>

</div>
</div>
<a class="anchor" id="a7be6db86ecb5d2692a0d82b1fa32f981"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool UIRect.isFullyAnchored</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Whether the rectangle is currently anchored fully on all sides. </p>

</div>
</div>
<a class="anchor" id="ac755b8e3a6fec359df0f21fb65ee8737"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">abstract Vector3 [] UIRect.localCorners</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Local-space corners of the UI rectangle. The order is bottom-left, top-left, top-right, bottom-right. </p>

</div>
</div>
<a class="anchor" id="aa4332a5373019290da50a2537f800139"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_u_i_rect.html">UIRect</a> UIRect.parent</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the rectangle's parent, if any. </p>

</div>
</div>
<a class="anchor" id="a5573910254e9f08953dd2201b6ddc944"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_u_i_root.html">UIRoot</a> UIRect.root</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the root object, if any. </p>

</div>
</div>
<a class="anchor" id="a9b7d5aa9d8f31c2cd92ed3dc2858f5b1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">abstract Vector3 [] UIRect.worldCorners</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>World-space corners of the UI rectangle. The order is bottom-left, top-left, top-right, bottom-right. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/WorkDir/Unity3D_Work/taidou_arpg/Assets/NGUI/Scripts/Internal/UIRect.cs</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_u_i_rect.html">UIRect</a></li>
    <li class="footer">Generated on Sat Jan 4 2020 22:30:28 for NGUI by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9 </li>
  </ul>
</div>
</body>
</html>
